<?php

/**
 * GeoCities form base class.
 *
 * @package    virtualdelivery
 * @subpackage form
 * @author     Your name here
 */
class BaseGeoCitiesForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'cty_id'   => new sfWidgetFormInputHidden(),
      'cty_name' => new sfWidgetFormInput(),
      'sta_id'   => new sfWidgetFormPropelChoice(array('model' => 'GeoStates', 'add_empty' => false)),
    ));

    $this->setValidators(array(
      'cty_id'   => new sfValidatorPropelChoice(array('model' => 'GeoCities', 'column' => 'cty_id', 'required' => false)),
      'cty_name' => new sfValidatorString(array('max_length' => 60)),
      'sta_id'   => new sfValidatorPropelChoice(array('model' => 'GeoStates', 'column' => 'sta_id')),
    ));

    $this->widgetSchema->setNameFormat('geo_cities[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'GeoCities';
  }


}
